import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import File from "../views/FileImport/File.vue";
import Operator from "../views/Operator/Operator.vue";
import Program from "../views/Program/Program.vue";
import UsingHelp from "../views/UsingHelp/UsingHelp.vue";
import Login from "../views/Login.vue";
import Fescribe from "../views/Fescribe/fescribe.vue";
import ConversionRules from "../views/ConversionRules/conversionRules.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/home/file",
  },
  {
    path: "/home",
    name: "Home",
    component: Home,
    children: [
      {
        path: "file",
        name: "file",
        component: File,
      },
      {
        path: "operator",
        name: "operator",
        component: Operator,
      },
      {
        path: "program",
        name: "program",
        component: Program,
        // meta: { KeepAlive: true },
      },
      {
        path: "usingHelp",
        name: "usingHelp",
        component: UsingHelp,
      },
      {
        path: "fescribe",
        name: "fescribe",
        component: Fescribe,
      },
      {
        path: "conversionRules",
        name: "conversionRules",
        component: ConversionRules,
      },
    ],
  },
  {
    path: "/login",
    name: "Login",
    component: Login,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
